fix: resolve 5 critical package vulnerabilities (form-data, cipher-base, sha.js, pbkdf2, tar) - #108
Conversation
Four are dev-only transitive deps, updated within their existing parent semver ranges (lockfile-only, no package.json change): - form-data 3.0.0 -> 3.0.5 CVE-2025-7783 (via gitlab, ^3.0.0) - cipher-base 1.0.4 -> 1.0.7 CVE-2025-9287 (via browserify-aes/des, create-hash/hmac) - sha.js 2.4.11 -> 2.4.12 CVE-2025-9288 (via create-hash/hmac, pbkdf2) - pbkdf2 3.1.2 -> 3.1.6 CVE-2025-6547 (via crypto-browserify, parse-asn1) tar (CVE-2026-59873) is removed rather than bumped. It was never used by this project - no source file imports it. It was added as a bare root pin in TCE-797 to force an upgrade of the tar that fsevents@1.x bundled for node-pre-gyp, but a root-level dependency cannot override a nested bundled one, so the pin fixed nothing and simply added a second copy of tar to the tree. That copy is what Vanta has now flagged twice (also bumped in #95). Nothing else in the tree requires tar, so removing the pin drops it entirely. Note the advisory ranges npm reports are wider than Vanta's for two of these (tar <=7.5.20 vs <=7.5.18, form-data 3.0.0-3.0.4 vs <3.0.4), so the higher fixed versions were used. lockfileVersion deliberately kept at 2: CI runs Node 10 (npm 6), which cannot read lockfileVersion 3.
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Duplication | 0 |
AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.
TIP This summary will be updated as you push new changes.
There was a problem hiding this comment.
Pull Request Overview
This PR addresses five critical vulnerabilities (form-data, cipher-base, sha.js, pbkdf2, and tar) and maintains lockfile compatibility for Node 10. While the updates are largely beneficial and Codacy results are up to standards, the removal of the 'tar' dependency requires careful verification. If 'tar' is used directly in the codebase or was previously pinned to mitigate transitive vulnerabilities (such as CVE-2023-46136), its removal may lead to runtime failures or security regressions. The provided test plan focuses on auditing the final dependency tree and verifying build integrity to ensure no regressions were introduced.
Test suggestions
- Verify that npm audit reports no vulnerabilities for the targeted packages after the update.\n- [ ] Verify 'tar' and its exclusive transitive dependencies (fs-minipass, minipass, minizlib, chownr, mkdirp, yallist) are purged from the lockfile.\n- [ ] Run the build pipeline and compare the bundle hash to ensure no functional regressions occurred during dependency updates.
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Verify that npm audit reports no vulnerabilities for the targeted packages after the update.\n- [ ] Verify 'tar' and its exclusive transitive dependencies (fs-minipass, minipass, minizlib, chownr, mkdirp, yallist) are purged from the lockfile.\n- [ ] Run the build pipeline and compare the bundle hash to ensure no functional regressions occurred during dependency updates.
TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback
| "ramda": "^0.27.0", | ||
| "rxjs": "^7.0.0-beta.0", | ||
| "tar": ">=6.2.1" | ||
| "rxjs": "^7.0.0-beta.0" |
There was a problem hiding this comment.
🔴 HIGH RISK
The PR title mentions resolving a vulnerability in 'tar', but the package was removed from 'package.json'. If this entry was used to override a transitive vulnerability (e.g., for node-gyp), removing it may re-introduce the risk. Additionally, if 'tar' is used directly in the code, this change will cause a runtime error. \n\nCheck if 'tar' is used directly or as a version override; if it is still required by the dependency tree, ensure it is updated to a secure version rather than being removed.
The build job has been failing at 'Set up job' for every non-master branch since GitHub closed down actions/cache v1: This request has been automatically failed because it uses a deprecated version of actions/cache: v1 Nothing in the job ever ran, so every PR has been red for months. It went unnoticed because the job is skipped on master (if: github.ref != master), and a skipped job reports success. actions/checkout v2 -> v4 actions/setup-node v1 -> v4 actions/cache v1 -> v4 NODE_VERSION is left at 10.x deliberately: the committed material/ assets were built with it, and Node 10 (OpenSSL 1.1) still provides the md4 hash webpack 4 needs. Every dependency changed in this PR is Node 10 compatible (strictest engine is form-data >= 6).
8f74ad8
Resolves 5 critical dependency advisories flagged by our dependency scanner.
Four in-range updates (lockfile only)
All four are dev-only transitive dependencies whose fixed versions already satisfy their parents' semver ranges, so no
package.jsonchange was needed:form-datagitlab(^3.0.0)cipher-basebrowserify-aes/-des,create-hash/-hmacsha.jscreate-hash/-hmac,pbkdf2pbkdf2crypto-browserify,parse-asn1taris removed, not bumped (CVE-2026-59873)tarwas never used by this project — no source file imports it, and nothing in the dependency tree requires it.It was introduced as a bare root pin (
tar: ">=4.4.18", later>=6.2.1) in TCE-797 (#93) to force an upgrade of thetarthatfsevents@1.xbundles fornode-pre-gyp. A root-level dependency cannot override a nested bundled one, so the pin never fixed the vulnerable copy — it just added a second, independenttarto the tree. That second copy is what has now been flagged twice (it was already bumped once in #95).Since nothing else requires it, deleting the pin removes
tarand its six exclusive deps (fs-minipass,minipass,minizlib,chownr,mkdirp,yallist) from the lockfile entirely.Notes for review
tar <=7.5.20vs<=7.5.18;form-data 3.0.0-3.0.4vs<3.0.4). The higher fixed versions were used, otherwisenpm auditwould still report them.lockfileVersionis deliberately kept at 2. CI runs Node 10 (npm 6), which cannot readlockfileVersion3.tar+ its deps, plushas-protowhich the newerget-intrinsicno longer needs).Verification
npm ci→ exit 0, 990 packagesnpm auditnpm run buildproduces a byte-identical bundle — hash61cff45dbf8e65fc, matching a pre-change baseline build. No build output is included in this PR.Pre-existing issues, not addressed here
error:0308010C:digital envelope routines::unsupportedunder OpenSSL 3; this reproduces onmaster. Building today requiresNODE_OPTIONS=--openssl-legacy-provider(or Node <= 16), which is how the baseline above was produced.material/assets no longer match what the toolchain produces — rebuilding yields different content hashes than the checked-in files. Unchanged by this PR, but worth noting since the build workflow's last step is agit diffdrift check.🤖 Generated with Claude Code